package com.tduck.cloud.datav.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tduck.cloud.common.entity.BaseEntity;
import com.tduck.cloud.common.mybatis.handler.JacksonTypeHandler;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.apache.ibatis.type.JdbcType;

import java.util.List;
import java.util.Map;

/**
 * 数据大屏用户项目对象 dv_user_project
 *
 * @author tduck-gen
 * @date 2022-02-20 13:44:13
 */
@Data
@FieldNameConstants
@TableName(value = "rp_screen", autoResultMap = true)
public class ScreenEntity extends BaseEntity {


    /**
     *
     */
    private Long id;

    /**
     * 分组
     */
    private Long groupId;

    /**
     * 项目名
     */
    private String name;

    /**
     * 状态 0:未发布 1:已发布
     */
    private Integer status;

    /**
     * 缩略图
     */
    private String thumbnail;

    private Long userId;

    /**
     * 唯一标识
     */
    private String shareKey;

    /**
     * 返回时忽略
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;
    /**
     * 排序列
     */
    @TableField(exist = false)
    private transient String sortColumn;

    /**
     * 组件列表
     */
    @TableField(typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<Map<String, Object>> coms;

    /**
     * 大屏配置
     */
    @TableField(typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private Map<String, Object> config;


}
